package com.itheima.wisdomnext.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 配置图片资源处理器
        registry.addResourceHandler("/uploaded_images/**")
                .addResourceLocations("file:D:/浮岛/wisdom-next/src/main/resources/static/uploaded_images/");

        // 配置视频资源处理器
        registry.addResourceHandler("/uploaded_video/**")
                .addResourceLocations("file:D:/浮岛/wisdom-next/src/main/resources/static/uploaded_video/");
    }
}